let obj = {
    goodsObj:{'0':6,'1':5},
    addShopcart({id,num}){
        //console.log(id);
        //新加key或者追加value
        if(this.goodsObj[id]){
            this.goodsObj[id] += num;
        }else{
            this.goodsObj[id] = num;
        }
    },
    deleteGoods(){

    }
}
window.test = obj;
export default obj;